home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / earthlink / nscomm / java40.jar / sun / awt / windows / WTextComponentPeer.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-03  |  903 b   |  39 lines

  1. package sun.awt.windows;
  2.  
  3. import java.awt.Color;
  4. import java.awt.Component;
  5. import java.awt.TextComponent;
  6. import java.awt.peer.TextComponentPeer;
  7.  
  8. abstract class WTextComponentPeer extends WComponentPeer implements TextComponentPeer {
  9.    public WTextComponentPeer(Component var1) {
  10.       super(var1);
  11.    }
  12.  
  13.    public void setEditable(boolean var1) {
  14.       this.widget_setEditable(var1);
  15.       this.setBackground(super.target.getBackground());
  16.    }
  17.  
  18.    public native String getText();
  19.  
  20.    public native void setText(String var1);
  21.  
  22.    public native int getSelectionStart();
  23.  
  24.    public native int getSelectionEnd();
  25.  
  26.    public native void select(int var1, int var2);
  27.  
  28.    public native void widget_setEditable(boolean var1);
  29.  
  30.    public void setBackground(Color var1) {
  31.       TextComponent var2 = (TextComponent)super.target;
  32.       if (var2.isEditable()) {
  33.          var1 = var1.brighter();
  34.       }
  35.  
  36.       super.setBackground(var1);
  37.    }
  38. }
  39.